let methods = {
  findVal: function (opts, idx) {
    let item = opts.find((v, i) => {
      return i === idx;
    });
    return item ? item.value : opts[opts.length - 1].value;
  },
  quickSet: function (idx) {
    this.form.protocol = this.optsProtocol[0].value;
    this.form.hostname = this.findVal(this.optsHostname, idx);
    this.form.post = this.findVal(this.optsPost, idx);
    this.form.pathname = this.findVal(this.optsPathname, idx);
    return;
  },
};
